/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.sd.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 消息管理，记录短信发送信息Entity
 * @author ysj
 * @version 2020-08-03
 */
@Table(name="sd_msg_manager", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="msg_content", attrName="msgContent", label="消息内容"),
		@Column(name="msg_type", attrName="msgType", label="消息类型", comment="消息类型（1：分发 2：催领 3：催还）"),
		@Column(name="send_status", attrName="sendStatus", label="发送状态", comment="发送状态（1：成功 2：失败）"),
		@Column(name="telphone", attrName="telphone", label="手机号码"),
		@Column(name="send_date", attrName="sendDate", label="发送日期"),
		@Column(name="doc_id", attrName="docId", label="文件编号"),
	}, orderBy="a.id DESC"
)
public class MsgManager extends DataEntity<MsgManager> {
	
	private static final long serialVersionUID = 1L;
	private String msgContent;		// 消息内容
	private String msgType;		// 消息类型（1：分发 2：催领 3：催还）
	private String sendStatus;		// 发送状态（1：成功 2：失败）
	private String telphone;		// 手机号码
	private Date sendDate;		// 发送日期
	private String docId;		// 文件编号
	
	public MsgManager() {
		this(null);
	}

	public MsgManager(String id){
		super(id);
	}
	
	@NotBlank(message="消息内容不能为空")
	@Length(min=0, max=200, message="消息内容长度不能超过 200 个字符")
	public String getMsgContent() {
		return msgContent;
	}

	public void setMsgContent(String msgContent) {
		this.msgContent = msgContent;
	}
	
	@Length(min=0, max=1, message="消息类型长度不能超过 1 个字符")
	public String getMsgType() {
		return msgType;
	}

	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}
	
	@NotBlank(message="发送状态不能为空")
	@Length(min=0, max=1, message="发送状态长度不能超过 1 个字符")
	public String getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(String sendStatus) {
		this.sendStatus = sendStatus;
	}
	
	@NotBlank(message="手机号码不能为空")
	@Length(min=0, max=50, message="手机号码长度不能超过 50 个字符")
	public String getTelphone() {
		return telphone;
	}

	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="发送日期不能为空")
	public Date getSendDate() {
		return sendDate;
	}

	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}
	
	@NotBlank(message="文件编号不能为空")
	@Length(min=0, max=64, message="文件编号长度不能超过 64 个字符")
	public String getDocId() {
		return docId;
	}

	public void setDocId(String docId) {
		this.docId = docId;
	}
	
}